// 这是专门的路由

// 导入不同的组件
import login from './components/tabbar/Logincontanier.vue'
import member from './components/tabbar/Membercontanier.vue'
import shopcar from './components/tabbar/Shopcontanier.vue'
import serach from './components/tabbar/Serachcontanier.vue'
import newlist from './components/New/NewList.vue'
import newinfo from './components/New/Newinfo.vue'
import images from './components/images/img.vue'
import imginfo from './components/images/imginfo.vue'
import VueRouter from 'vue-router'
import goods from './components/goods/goodslist.vue'
import goodsinfo from './components/goods/goodsinfo.vue'
import goodintro from './components/goods/goodintro.vue'
import goodcomment from './components/goods/goodcomment.vue'
// 创建router对象
var router = new VueRouter({
    // 设置路由匹配规则
    routes: [{
        path: '/',
        redirect: '/login'
    }, {
        path: '/login',
        component: login
    }, {
        path: '/member',
        component: member
    }, {
        path: '/shopcar',
        component: shopcar
    }, {
        path: '/serach',
        component: serach
    }, {
        path: '/login/newlist',
        component: newlist
    }, {
        path: '/login/newlist/:id',
        component: newinfo
    }, {
        path: '/login/images',
        component: images
    }, {
        path: '/login/images/:id',
        component: imginfo
    }, {
        path: '/login/goods',
        component: goods
    }, {
        path: '/login/goods/:id',
        component: goodsinfo,
        name: 'user'
    }, {
        path: '/login/goodsintro:id',
        component: goodintro
    }, {
        path: '/login/goodcomment:id',
        component: goodcomment
    }],
    linkActiveClass: 'mui-active' // 给每个路由设置默认高亮，当点击到的时候变成高亮
})

export default router